import Msite from '../views/Msite/Msite'
import Search from '../views/Search/Search'
import Order from '../views/Order/Order'
import Profile from '../views/Profile/Profile'
import Login from '../views/Login/Login'
import Shop from '../views/Shop/Shop'

// 子路由
import Info from '../views/Shop/Info/Info'
import Meal from '../views/Shop/Meal/Meal'
import Rating from '../views/Shop/Rating/Rating'
import shop from '../store/modules/shop'

// 管理路由组件
export default [
  {
    path: '/msite',
    component: Msite,
    meta: {
      isShowFooterGuide: true
    }
  },
  {
    path: '/search',
    component: Search,
    meta: {
      isShowFooterGuide: true
    }
  },
  {
    path: '/order',
    component: Order,
    meta: {
      isShowFooterGuide: true
    }
  },
  {
    path: '/profile',
    component: Profile,
    meta: {
      isShowFooterGuide: true
    }
  },
  {
    path: '/login',
    component: Login
  },
  {
    path: '/shop',
    component: Shop,
    children: [
      {
        path: '/shop/meal',
        component: Meal
      },
      {
        path: 'rating',
        component: Rating
      },
      {
        path: 'info',
        component: Info
      },
      {
        path: '',
        redirect: '/shop/meal'
      }
    ]
  },
  // 重定向
  {
    path: '/',
    redirect: '/login'
  }
]